package com.springBoot.springBootSysCore.modules.services.system;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.springBoot.springBootSysCore.common.service.IBaseService;
import com.springBoot.springBootSysCore.modules.entity.system.SysFaq;
import com.springBoot.springBootSysCore.modules.entity.system.SysMessage;
import com.springBoot.springBootSysCore.modules.entity.system.SysMessageLog;
import org.springframework.data.domain.PageRequest;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public interface SysMessageService extends IBaseService<SysMessage,String> {
	Map<String, Object> save(SysMessage entity);

	Map<String, Object> deleteEntity(SysMessage entity);

	/**
	 * 查询公告消息
	 * @param request
	 * @param pageRequest
	 * @return
	 */
	Map<String, Object> getPublicMessage(HttpServletRequest request, PageRequest pageRequest);

	/**
	 * 统计消息
	 * @param request
	 * @return
	 * @throws JsonProcessingException
	 */
	Map<String, Object> countMessage(HttpServletRequest request);
	/**
	 * 全部已读
	 * @param request
	 * @return
	 * @throws JsonProcessingException
	 */
	Map<String, Object> readAllMessage(HttpServletRequest request, String type);
	/**
	 * 已读消息
	 * @param request
	 * @return
	 * @throws JsonProcessingException
	 */
	Map<String, Object> readMessage(HttpServletRequest request, String id);
	/**
	 * 删除消息
	 * @param request
	 * @return
	 * @throws JsonProcessingException
	 */
	Map<String, Object> deleteMessage(HttpServletRequest request, String id);

}
